#include <gtest/gtest.h>
#include <iostream>
#include "Instruction.h"
#include "ASSIGN_VARIABLE.h"
#include "Data.h"
#include "Expression.h"
#include "Memory.h"

TEST(ASSIGN_VARIABLE_Instruction_test, BasicUsage) {
	
	Memory memory;
	
	Expression* e = Expression::createExpression(DataHolder::INT, &memory);
	e->addSubExpression(Data::createInt(10));
	
	ASSIGN_VARIABLE_Instruction* instruction = new ASSIGN_VARIABLE_Instruction("x", e);
	
	EXPECT_EQ(instruction->getVariableName(), "x");
	EXPECT_FLOAT_EQ(instruction->getVariableExpression()->getIntValue(), 10);
	
	delete instruction;
}